import request from '@/utils/request'

export default {
  //查询讲师列表
  getTeacherList(current,size,teacher){
    return request({
      url: `/teacher/getBackTeacherList/${current}/${size}`,
      method: 'post',
      data:teacher
    })
  },
  //删除讲师
  deleteTeacher(id){
    return request({
      url:`/teacher/deleteById/${id}`,
      method:'delete'
    })
  },
  //添加讲师
  addTeacher(teacher){
    return request({
      url:`/teacher/saveTeacher`,
      method:'post',
      data:teacher
    })
  },
  //根据id查询讲师
  getById(id){
    return request({
      url:`/teacher/getBackById/${id}`,
      method:'get',
    })
  },
  //修改讲师
  updateTeacher(teacher){
    return request({
      url:`/teacher/updateTeacher`,
      method:'post',
      data:teacher
    })
  },
  //查询所有讲师
  getAllTeacher(){
    return request({
      url:`/teacher/getAllTeacher`,
      method:'get'
    })
  }
}




